Skip to content

[Repo Assist] perf: parallelise test project builds when running tests#2150

Draft
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/perf-parallel-run-builds-2026-03-13-0bdb5ca98b0cc3eb
Draft

[Repo Assist] perf: parallelise test project builds when running tests#2150
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/perf-parallel-run-builds-2026-03-13-0bdb5ca98b0cc3eb

Conversation

@github-actions
Copy link
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Summary

When the user clicks Run Tests in the Test Explorer, Ionide builds each test project before executing the tests. Previously this was done sequentially via Promise.mapExecuteForAll. This PR switches to Promise.executeWithMaxParallel maxParallelTestProjects (capped at 3 concurrent builds, the same limit used for test execution) so that project builds happen in parallel.

Motivation

This is a companion change to PR #2142, which parallelises builds in refreshTestList. The run-tests path (runTestsHandler) had the same sequential bottleneck. The improvement is most noticeable when a user runs all tests across a solution with several test projects — instead of building them one-by-one, up to 3 are built concurrently.

Changes

src/Components/TestExplorer.fs:

  • Changed Promise.mapExecuteForAll (buildProject testRun)Promise.executeWithMaxParallel maxParallelTestProjects (buildProject testRun) in the run-tests build step
  • Updated the downstream List.choose id to Array.choose id |> List.ofArray to match the array return type of executeWithMaxParallel

Trade-offs

  • executeWithMaxParallel is bounded concurrency (max 3 parallel builds), so it won't overwhelm machines with large solutions
  • No change to the run-tests test execution step — that already uses executeWithMaxParallel
  • No change to the language-server test path

Test Status

The build infrastructure in this environment requires dotnet tool restore + FAKE, which is not available without a full CI run. The change is a two-line mechanical substitution matching the same pattern already used in the test-execution step (line 1994) and in the refresh path (PR #2142). No logic changes — only the scheduling strategy for the builds is affected.

🤖 Generated by Repo Assist

Generated by Repo Assist ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@346204513ecfa08b81566450d7d599556807389f

Previously, buildProject was invoked sequentially via mapExecuteForAll
for each project in the run request.  Switch to executeWithMaxParallel
(capped at maxParallelTestProjects = 3) so builds run concurrently,
matching the pattern already used for the actual test-execution step.

This is a companion change to the parallel-builds improvement in
refreshTestList (PR #2142).  The benefit is most visible when the user
chooses 'Run All Tests' across a solution with several test projects.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants